Skip to content

[Transformations] EliminateSequentialFakeQuantize #36075

Merged
mryzhov merged 36 commits into
openvinotoolkit:masterfrom
mryzhov:fqs_remove
Jun 30, 2026
Merged

[Transformations] EliminateSequentialFakeQuantize #36075
mryzhov merged 36 commits into
openvinotoolkit:masterfrom
mryzhov:fqs_remove

Conversation

@mryzhov

@mryzhov mryzhov commented May 26, 2026

Copy link
Copy Markdown
Contributor

Details:

EliminateSequentialFakeQuantize removes redundant FakeQuantize after FakeQuantize when all parameters and levels match exactly.

Tickets:

AI Assistance:

@mryzhov
mryzhov requested a review from a team as a code owner May 26, 2026 15:21
@github-actions github-actions Bot added the category: transformations OpenVINO Runtime library - Transformations label May 26, 2026
@mryzhov
mryzhov requested a review from Copilot May 26, 2026 15:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the common NopElimination transformation set with a new matcher pass, EliminateSequentialFakeQuantize, intended to remove redundant FakeQuantize nodes when a second FakeQuantize is provably a no-op given the first one. It adds corresponding unit tests under the common transformations test suite.

Changes:

  • Added ov::pass::EliminateSequentialFakeQuantize matcher pass and registered it in ov::pass::NopElimination.
  • Implemented parameter/range/grid checks for sequential FakeQuantize elimination, plus small numeric helper utilities.
  • Added new regression tests (including a parameterized suite) for sequential FakeQuantize elimination behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
src/common/transformations/src/transformations/common_optimizations/nop_elimination.cpp Implements the new EliminateSequentialFakeQuantize matcher and registers it in NopElimination.
src/common/transformations/include/transformations/common_optimizations/nop_elimination.hpp Declares the new matcher pass and documents intended elimination cases/examples.
src/common/transformations/tests/common_optimizations/nop_elimination.cpp Adds regression coverage and a parameterized test suite for sequential FakeQuantize elimination.

Comment thread src/common/transformations/tests/common_optimizations/nop_elimination.cpp Outdated
@mryzhov
mryzhov requested a review from Copilot June 23, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mryzhov
mryzhov requested a review from Copilot June 25, 2026 08:44

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Comment thread src/common/transformations/src/transformations/utils/utils.cpp

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

@v-Golubev v-Golubev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only minor comments left

mryzhov and others added 3 commits June 25, 2026 17:12
…mizations/fq_eliminate_sequential.hpp

Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@mryzhov
mryzhov enabled auto-merge June 26, 2026 08:26
@mryzhov
mryzhov added this pull request to the merge queue Jun 30, 2026
Merged via the queue into openvinotoolkit:master with commit 5e120a0 Jun 30, 2026
209 of 211 checks passed
@mryzhov
mryzhov deleted the fqs_remove branch June 30, 2026 09:23
praasz pushed a commit to praasz/openvino that referenced this pull request Jul 1, 2026
)

### Details:
EliminateSequentialFakeQuantize removes redundant FakeQuantize after
FakeQuantize when all parameters and levels match exactly.

### Tickets:
 - *[CVS-179211](https://jira.devtools.intel.com/browse/CVS-179211)*

### AI Assistance:
 - *AI assistance used: yes*
 - *created using skill openvinotoolkit#36074*

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Vladislav Golubev <vladislav.golubev@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: transformations OpenVINO Runtime library - Transformations

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants